

var defaultValue = Cesium.defaultValue;
var defined = Cesium.defined;
var defineProperties = Object.defineProperties;
var DeveloperError = Cesium.DeveloperError;
var Event = Cesium.Event;
var createMaterialPropertyDescriptor = Cesium.createMaterialPropertyDescriptor;
var createPropertyDescriptor = Cesium.createPropertyDescriptor;

function RadarSensorGraphics(options) {
    this._show = undefined;
    this._color = undefined;

    this._AzimuthFrom = undefined;
    this._AzimuthTo = undefined;
    this._ElevationFrom = undefined;
    this._ElevationTo = undefined;
    this._radius = undefined;
    this._slice = undefined;
    this._lineColor = undefined;

    this._definitionChanged = new Event();
    this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT));
}

Object.defineProperties(RadarSensorGraphics.prototype, {
    definitionChanged: {
        get: function () {
            return this._definitionChanged;
        }
    },
    show: createPropertyDescriptor('show'),
    color: createPropertyDescriptor('color'),
    lineColor: createPropertyDescriptor('lineColor'),
    AzimuthFrom: createPropertyDescriptor('AzimuthFrom'),
    AzimuthTo: createPropertyDescriptor('AzimuthTo'),
    ElevationFrom: createPropertyDescriptor('ElevationFrom'),
    ElevationTo: createPropertyDescriptor('ElevationTo'),
    radius: createPropertyDescriptor('radius'),
    slice: createPropertyDescriptor('slice'),

    // gaze: createPropertyDescriptor('gaze'),
});

RadarSensorGraphics.prototype.clone = function (result) {
    if (!defined(result)) {
        result = new RadarSensorGraphics();
    }
    result.show = this.show;
    result.color = this.color;
    result.lineColor = this.lineColor;
    result.AzimuthFrom = this.AzimuthFrom;
    result.AzimuthTo = this.AzimuthTo;
    result.ElevationFrom = this.ElevationFrom;
    result.ElevationTo = this.ElevationTo;
    result.radius = this.radius;
    result.slice = this.slice;

    return result;
};

RadarSensorGraphics.prototype.merge = function (source) {
    if (!defined(source)) {
        throw new DeveloperError('source is required.');
    }
    this.show = defaultValue(this.show, source.show);
    this.color = defaultValue(this.color, source.color);
    this.lineColor = defaultValue(this.lineColor, source.lineColor);
    this.AzimuthFrom = defaultValue(this.AzimuthFrom, source.AzimuthFrom);
    this.AzimuthTo = defaultValue(this.AzimuthTo, source.AzimuthTo);
    this.ElevationFrom = defaultValue(this.ElevationFrom, source.ElevationFrom);
    this.ElevationTo = defaultValue(this.ElevationTo, source.ElevationTo);
    this.radius = defaultValue(this.radius, source.radius);
    this.slice = defaultValue(this.slice, source.slice);
};


export { RadarSensorGraphics };